package com.woniu.apartment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.apartment.mapper.PopularCityMapper;
import com.woniu.apartment.domain.PopularCity;
import com.woniu.apartment.service.IPopularCityService;

/**
 * 首页热门房源城市Service业务层处理
 * 
 * @author yy
 * @date 2023-04-03
 */
@Service
public class PopularCityServiceImpl implements IPopularCityService 
{
    @Autowired
    private PopularCityMapper popularCityMapper;

    /**
     * 查询首页热门房源城市
     * 
     * @param id 首页热门房源城市主键
     * @return 首页热门房源城市
     */
    @Override
    public PopularCity selectPopularCityById(Long id)
    {
        return popularCityMapper.selectPopularCityById(id);
    }

    /**
     * 查询首页热门房源城市列表
     * 
     * @param popularCity 首页热门房源城市
     * @return 首页热门房源城市
     */
    @Override
    public List<PopularCity> selectPopularCityList(PopularCity popularCity)
    {
        return popularCityMapper.selectPopularCityList(popularCity);
    }

    /**
     * 新增首页热门房源城市
     * 
     * @param popularCity 首页热门房源城市
     * @return 结果
     */
    @Override
    public int insertPopularCity(PopularCity popularCity)
    {
        return popularCityMapper.insertPopularCity(popularCity);
    }

    /**
     * 修改首页热门房源城市
     * 
     * @param popularCity 首页热门房源城市
     * @return 结果
     */
    @Override
    public int updatePopularCity(PopularCity popularCity)
    {
        return popularCityMapper.updatePopularCity(popularCity);
    }

    /**
     * 批量删除首页热门房源城市
     * 
     * @param ids 需要删除的首页热门房源城市主键
     * @return 结果
     */
    @Override
    public int deletePopularCityByIds(Long[] ids)
    {
        return popularCityMapper.deletePopularCityByIds(ids);
    }

    /**
     * 删除首页热门房源城市信息
     * 
     * @param id 首页热门房源城市主键
     * @return 结果
     */
    @Override
    public int deletePopularCityById(Long id)
    {
        return popularCityMapper.deletePopularCityById(id);
    }
}
